package org.exercise10.state;

/**
 * @author Stranger
 * @version 1.0
 * @description: TODO
 * @date 2022/12/20 17:27
 */
public abstract class DoorStatus implements State {

    protected Context context;

    @Override
    public void open() {
        System.out.println(this.context.getState().toString() + ": 当前状态不支持open");
    }

    @Override
    public void StayOpen() {
        System.out.println(this.context.getState().toString() + ": 当前状态不支持stayOpen");
    }

    @Override
    public void close() {
        System.out.println(this.context.getState().toString() + ": 当前状态不支持close");
    }

    public void setContext(Context context) {
        this.context = context;
    }

    @Override
    public void touch() {
        System.out.println(this.context.getState().toString() + ": 当前状态不支持touch");
    }
}
